package com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation;

import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation.dto.BusinessEmployeeCompensationListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation.param.BusinessEmployeeCompensationCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation.param.BusinessEmployeeCompensationDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation.param.BusinessEmployeeCompensationListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation.param.BusinessEmployeeCompensationUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 员工薪酬福利
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Employee Compensation Management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessEmployeeCompensationCloudServiceFallback.class)
@RequestMapping("/business/employee/compensation")
public interface BusinessEmployeeCompensationCloudService {

    // 查询员工薪酬福利列表
    @ApiOperation(value = "Query Employee Compensation List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation.BusinessEmployeeCompensationCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessEmployeeCompensationListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Employee List", dataType = "BusinessEmployeeCompensationListCloudParam", dataTypeClass = BusinessEmployeeCompensationListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessEmployeeCompensationListCloudDto list(BusinessEmployeeCompensationListCloudParam param);

    // 创建员工薪酬福利
    @ApiOperation(value = "Create Employee Compensation", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation.BusinessEmployeeCompensationCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Employee Compensation", dataType = "BusinessEmployeeCompensationCreateCloudParam", dataTypeClass = BusinessEmployeeCompensationCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessEmployeeCompensationCreateCloudParam param);


    // 编辑员工薪酬福利
    @ApiOperation(value = "Update Employee Compensation", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation.BusinessEmployeeCompensationCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Employee Compensation", dataType = "BusinessEmployeeCompensationUpdateCloudParam", dataTypeClass = BusinessEmployeeCompensationUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessEmployeeCompensationUpdateCloudParam param);


    // 删除员工薪酬福利
    @ApiOperation(value = "Delete Employee Compensation", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.compensation.BusinessEmployeeCompensationCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Employee Compensation", dataType = "BusinessEmployeeCompensationDeleteCloudParam", dataTypeClass = BusinessEmployeeCompensationDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessEmployeeCompensationDeleteCloudParam param);

}
